<template>
	<div class="mod-home">
		<div><el-alert title="欢迎进入SaaS餐饮管理系统" type="success"></el-alert></div><br/>
    <div><el-alert title="多租户多门店" type="warning"></el-alert></div><br/>
    <div><el-alert title="UI美观，操作简单" ></el-alert></div><br/>
    <div><el-alert title="微信公众号（渣男小四）" type="success"></el-alert></div><br/>

		<br />
		<el-row :gutter="10">
      <el-col :span="24">
        <el-card shadow="never"><avue-data-icons :option="option"></avue-data-icons></el-card>
      </el-col>
<!--      <el-col :span="8">-->
<!--        日志-->
<!--      </el-col>-->
    </el-row>
		<br />
		<div>

		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
      option: {
        span:4,
        data: [
          {
            title: '总消费人数',
            count: 0,
          },
          {
            title: '总收入',
            count: 0,
          },
          {
            title: '散客消费人数',
            count: 0,
          },
          {
            title: '散客消费金额',
            count: 0,
          },
          {
            title: '会员消费人数',
            count: 0,
          },
          {
            title: '会员消费总额',
            count: 0,
          },
          {
            title: '会员充值总额',
            count: 0,
          },
          {
            title: '挂单数',
            count: 0,
          },
          {
            title: '挂单现场已结金额',
            count: 0,
          },
          {
            title: '预定餐台个数',
            count: 0,
          },
          {
            title: '预定餐台总押金',
            count: 0,
          }
        ]
      },

		};
	},

  created() {
	  this.getData()
  },

  methods:{
    getData() {
      this.changeWorkVisible = true
      this.$http({
        url: this.$http.adornUrl('/reception/tstorechangeworkrecord/changeWorkData'),
        method: 'get'
      }).then(({ data }) => {
        if (data && data.code === 0) {
          let dataInfo = data.changeWorkInfo;
          this.option.data[0].count = dataInfo.totalNumber
          this.option.data[1].count = dataInfo.totalMoney;
          this.option.data[2].count = dataInfo.sanKeNumber;
          this.option.data[3].count = dataInfo.sanKeTotalMoney;
          this.option.data[4].count = dataInfo.memberNumber;
          this.option.data[5].count = dataInfo.memberTotalMoney;
          this.option.data[6].count = dataInfo.memberRechargeMoney;
          this.option.data[7].count = dataInfo.accountNumber;
          this.option.data[8].count = dataInfo.accountTotalMoney;
          this.option.data[9].count = dataInfo.reserveNumber;
          this.option.data[10].count = dataInfo.reserveTotalMoney;
        } else {
          this.dataInfo = [];
        }
      });
    }
  }
};
</script>

<style>
.mod-home {
	line-height: 1.5;
}
</style>
